package com.ruoyi.project.cms.pro.controller;

import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.cms.pro.domain.ProFile;
import com.ruoyi.project.cms.pro.service.CmsImgService;
import com.ruoyi.project.cms.pro.service.ProFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * com.ruoyi.project.cms.pro.controller
 * 作者：lh
 * 描述:
 * 时间:2020-05-20
 */
@Controller
@RequestMapping("/pro/hard")
public class ProFileHardController extends BaseController {

    private String prefix = "cms/pro";

    @Autowired
    private ProFileService proFileService;


    @GetMapping("")
    public String getHard(){
        return prefix +"/prohard";
    }

    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(ProFile proFile) {
        List<ProFile> list=null;
        list=proFileService.selectByBench1(proFile);
        startPage();
        if (list!=null)
        {
            return getDataTable(list);
        }
        return new TableDataInfo();

    }



}
